import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from "axios";
import Plugin from 'v-fit-columns';
import config from "./config.js";

Vue.use(Plugin);

// axios请求配置
axios.defaults.baseURL = config.baseUrl;

Vue.prototype.$axios = axios;

// 按需引入组件
import {
    Form,
    FormItem,
    Card,
    Icon,
    Button,
    MessageBox,
    Table,
    TableColumn,
    Pagination,
    Tag,
    Dialog,
    Input,
    Popover,
    Select,
    Option,
    DatePicker,
    Upload,
    Message,
    Radio,
    RadioGroup,
    Checkbox,
    Switch,
    Dropdown,
    Popconfirm,
    RadioButton,
    Tooltip,
    Drawer
} from 'element-ui';

Vue.use(Tooltip)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Card)
Vue.use(RadioButton)
Vue.use(Popconfirm)
Vue.use(Switch)
Vue.use(Dropdown)
Vue.use(Checkbox)
Vue.use(DatePicker)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Select)
Vue.use(Option)
Vue.use(Icon)
Vue.use(Button)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Pagination)
Vue.use(Upload)
Vue.use(Tag) // 标签
Vue.use(Dialog) // 弹出对话框
Vue.use(Input) // 输入框
Vue.use(Popover) // 弹出框
Vue.use(Drawer)

Vue.config.productionTip = false
Vue.prototype.$confirm = MessageBox.confirm;
// 消息提示
Vue.prototype.$message = Message;

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')

